-
Notifications
You must be signed in to change notification settings - Fork 27
Optimized Session constructor #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimized Session constructor #145
Conversation
…trations Dont use LINQ in ServiceRegistration Don't use LINQ .ToArray() in AttributeHelper.GetAttributes() precompute typeof() in static Optimize ServiceContainer.Create() Optimization: Memoize TypeHelper.GetConstructor() Remove automatically inserted `using System.Diagnostics.CodeAnalysis` Simple formatting private specifier Refactoring User .SequenceEqual() in TYpesComparer Refactor TypesCompares.GetHashCode() Rename TypesEqualityComparer typeofIServiceContainer Optimization: cache ServiceRegistration[] in DomainTypeRegistry public -> private Small optimizations: avoid LINQ in critical places Revert to SequenceEqual in TypesEqualityComparer.Equals() Remove comment reorder public/private methods
|
Please DO NOT reformat files that has no actual changes except formatting, save reviewer's time and keep him concentrated on the actual changes and do not waste time |
I have intentionally split the changes into a few commits:
|
|
So I can skip first commit. I'm not really used to it, I tent to apply formatting afterwards when everything is complete :) |
alex-kulakov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also something's wrong with the FieldInfo.cs, its diff is not shown.
Orm/Xtensive.Orm/Orm/Internals/FieldAccessors/EntityFieldAccessor.cs
Outdated
Show resolved
Hide resolved
It would be very difficult to apply changes from our repo (where we reformatted the files) into the Upstream repo with unformatted files. That is why such an order of commits. |
240ec6a#diff-b7b42eda53f702c01675e3d80d6583077c167b05e3c723803c24b1250b8c5985L447 |
Following benchmarks show the improvement:
Old Session constructor:
New Session constructor: